declare @TempTablasCount table (id int identity, Tabla varchar(100),idTabla varchar(max),Maximo Varchar(max) )
declare @max varchar(max)
declare @query nvarchar(max)
		,@tabla nvarchar(100)
		,@columna varchar(max)

declare qTabla Cursor for
with Taux as
	 ( Select c.name as 'columna', t.name as 'tabla' from sys.tables as t
										join sys.columns as c on c.object_id = t.object_id where column_id = 1
		
									)	

		select QUOTENAME(tabla), QUOTENAME(columna)  from Taux
open qTabla
Fetch next from qTabla into @tabla, @columna
while @@FETCH_STATUS = 0

begin

set @query = N'select @maximo= cast(max(' + @columna + ') as varchar(max)) from ' + @tabla 
exec sp_executesql @query,N'@maximo varchar(max) output',@maximo = @max output

insert into @TempTablasCount 
values (@tabla,@columna, @max)
fetch next from qTabla into @tabla, @columna

end
close qTabla
Deallocate qTabla 

select * from @TempTablasCount